using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.Domain.Entity;
using SmartLink.IRepository;
using SmartLink.Repository.Base;
using Dapper;

namespace SmartLink.Repository
{
   public class PER_PermissionsGroupRepo: RepositoryBase<PER_PermissionsGroup>, IPER_PermissionsGroupRepo
    {

        public IList<PER_PermissionsGroup> GetAllPermissionsGroup()
        {
            IList<PER_PermissionsGroup> actionPermissions = new List<PER_PermissionsGroup>();
            using (var conn = DapperHelper.GetDefaultConnection())
            {
                var sql = string.Format(@"select * from  PER_PermissionsGroup");
                actionPermissions = conn.Query<PER_PermissionsGroup>(sql).ToList();
                conn.Close();
                return actionPermissions;
            }
        }
    }
}
